package com.HMI;

import com.Input.OrpInput;
import com.Input.PhInput;
import com.Controls.ORP2Cl;
import com.Controls.pHSensor;

public class Main {

	private static PhInput pHInputThread;
	private static OrpInput orpInputThread;
	private static ORP2Cl ClControlThread;
	private static pHSensor pHControlThread;
	
	public static void main(String[] args) {
		Window window = new Window();
		window.frmAutomatedPoolBalancer.setVisible(true);
		
        pHInputThread = new PhInput();
        new Thread(pHInputThread).start();
        
        orpInputThread = new OrpInput();
        new Thread(orpInputThread).start();
      
        Main self = new Main();
        
        System.out.println("Starting Cl Control");
        ClControlThread = new ORP2Cl(self);
        new Thread(ClControlThread).start();

        System.out.println("Starting pH Control");
        pHControlThread = new pHSensor(self);
        new Thread(pHControlThread).start();
	}
	
	public double getOrpValue() {
		return orpInputThread.getORP();
	}
	
	public double getPhValue() {
		return pHInputThread.getPh();
	}
}
